home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DOSIMP12.ARJ
/
SIMPLY4.HYP
< prev
next >
Wrap
Text File
|
1992-01-16
|
107KB
|
1,901 lines
The |tCONFIG.SYS|t File
This is an ASCII text file that contains some special configuration com-
mands, which DOS reads each time you reboot your computer as long as the
file is located in the root directory of the disk you're |sboot|sing from.
You can make any changes you want to this file but they won't take effect
until the next time you reboot. Have a spare boo|1t disk handy first just
in case something doesn't work right, though. Here are the commands that
can be used in the |nCONFIG.SYS|n file:
BREAK COUNTRY DEVICEHIGH DRIVPARM FILES LASTDRIVE SHELL SWITCHAR
BUFFERS DEVIC|1E DO|1S FCBS INSTALL REM STACKS SWITCHES
BREAK and REM can also be used as regular DOS commands, but the others
can't be used anywhere except in the |nCONFIG.SYS|n file, and no other com-
mands besides these can be used in this file. Any number of DRIVPARM,
INSTALL, REM, DEVIC|1E, or DEVICEHIGH commands can be used, but the others
can only be used once in the file. The DEVIC|1E command is used to activ-
ate |sdevice driver|ss. RAMDRIVE.SYS, DRIVER.SYS, SMARTDRV.SYS, and ANSI.SYS
are a few examples of |sdevice driver|ss that come with DOS. Each device
driver can also be loaded only once, except DRIVER.SYS and the RAMdisk
<page down> for more CONFIG.SYS
drivers, which can be repeated.
One thing that very few people know, is that DOS does not read the com-
mands in the |nCONFIG.SYS|n file in the order they're written. It looks for
each command when it's good and ready. Of course, when it gets ready to
look for DEVIC|1E commands, it reads all of them and executes them in the
order they're listed. When it gets ready to look for INSTALL commands,
it does that, in the order they're listed. But it doesn't read any IN-
STALL commands until after it reads all the DEVIC|1E commands, even if the
INSTALL commands are all earlier in the |nCONFIG.SYS|n file than the DEVIC|1E
commands. So, it definitely does matter what order you put your DEVIC|1E
commands in, but it doesn't matter whether they come before or after the
BUFFERS command, or the DO|1S command, or the LASTDRIVE command. DOS could
not care less about the order of your |nCONFIG.SYS|n commands except in the
case of more than one occurrence of the same command.
<page down> for The |nBREAK|n Command
The |TBREAK|T Command
Here's a command that's not used very often. What it does, is to turn
|nextended|n break checking on and off. The default is off, so the only time
you need to use it is to turn it on, or to turn it off if you've already
turned it on.
So what is break checking? Well you can press the <Ctrl-Break> keystroke
combination to break out of a program that's running, if you decided you
didn't want to do it after all, or if it seems that something in the pro-
gram has gone wrong. Well if |nBREAK|n is off, then DOS will only check
to see if you have pressed <Ctrl-Break> each time an I/O operation is
performed. That means when the program is looking for input from the
keyboard or serial port, or when the program is sending output to the
screen, printer, or serial port. However, if |nBREAK|n is on, then DOS will
check the keyboard buffer for a <Ctrl-Break> keystroke every single time
the program makes any DOS function call. This includes when the program
is writing to disk, and all sorts of things. To put it simply, |nBREAK|n ON
makes it so that you can break out of a program a lot more easily, but of
<page down> for more BREAK
course it slows your system down because DOS has to take time to check
the keyboard buffer a lot more often. And if you break out of a disk
write, that disk's FAT can easily get trashed. Totalled. Ruined.
|nBREAK|n OFF puts the break setting back to normal, which means that break
checking will occur more seldom and the system will not be slowed down
by checking for break so often. The command |nBREAK|n all by itself, with
no ON or OFF parameters, will just report the |ncurrent|n state of |nBREAK|n.
The <Ctrl-C> keystroke combination is the same thing as <Ctrl-Break>.
This command can also be used in the CONFIG.SYS file if desired. In this
case you use an equals sign (=) between the command and the parameter, as
in BREAK=ON. Of course BREAK=OFF would never be needed in the CONFIG.SYS
file because |nBREAK|n is always off every time you reboot until such time as
a |nBREAK|n ON command is issued. I would never recommend using BREAK=ON in
the CONFIG.SYS file. It is dangerous and it slows the computer down. If
you have a program that requires |nextended|n break checking, run it from a
batch file that turns |nBREAK|n on at the beginning and off at the end.
<page down> for The |nBUFFERS|n Command
The |TBUFFERS|T Command
This command can only be used in your CONFIG.SYS file. It tells DOS how
many disk buffers to set up if you don't want to use the default. A disk
buffer is just like a very small cache with no look-ahead. So if you're
using a disk cache, you want to use a very small number of buffers, such
as 4. (Certainly not 0, though.) If not, use the largest one that the
installation manuals for your applications say. If one manual tells you
that app needs 25, and the manual for another app says 30, then use 30.
The syntax for the |nBUFFERS|n command is like this:
BUFFERS=AA,BB /X
The "AA" parameter in that example, is the number of buffers DOS should
set up. Each buffer takes 528 bytes of memory, to store 512 bytes of
disk data.
If you're using conventional or hig|1h memory for the buffers, you can have
anywhere from 1 to 99 of them. If you have a DOS version earlier than
3.3, the default is 2. If your DOS is 3.3 or later, then your default
<page down> for more BUFFERS
number of buffers depends on your hardware. If you have more than 256K
of RAM, then it's 10. Or if you have over 512K, it's 15.
If you have DOS version 4.0 or later, then you can use the ,BB parameter
in that example to specify the number of look-ahead |ssector|ss. (See the
section on Cache for what that means.) This parameter is optional, but
if you want any look-ahead |ssector|ss, you can use anywhere from 2 to 8, and
they each take up 512 bytes of RAM. If you're using a real disk cache,
then leave this parameter at the default, which is 1 and means no look-
ahead.
Another thing you can do, but only if you have DOS version 4, is to place
your buffers into expanded memory if you have it, to keep them from using
up your conventional memory. Expanded memory is what the /X parameter is
for in the |nBUFFERS|n command. And you are allowed up to ten thousand of
them, instead of the normal limit of 99.
Now in DOS version 5.0, if you have one meg of RAM so that you can load
DOS into the Hig|1h Memory Area, then the buffers go up there too, with the
<page down> for more BUFFERS
rest of the DOS kernel. That is, if there is room for all of them. See,
if you specify a number so large that they can't all fit up there the way
it is, like 46 for example, there is one small section of the DOS kernel
that can come back down to conventional memory to allow that huge chunk
of buffers to go hig|1h. Or if you use an even larger number, like 50, so
that they won't fit up there even with that little piece of DOS coming
back down, then the buffers will all stay in conventional memory. But if
you specify just the right amount, like 36 to 44 (it differs on different
computers), then all of the buffers can go hig|1h, and all of the DOS ker-
nel can stay hig|1h too and you don't lose a byte of conventional memory,
whether you use that large number of buffers, or a low number like 4.
Anyway, once you get up over 40 buffers, it takes DOS about as long to
search all those buffers for the required data as it would to just get it
from the hard drive, so having that many buffers can actually slow your
system down. Even fewer buffers than 40 can slow your system down if you
are using a disk cache. Because the buffers only hold a small amount of
data, but the computer is going to search there before it searches in the
cache, so the buffers waste time that would be better spent on the cache.
<page down> for The DEVICE Command
The |TDEVIC|1E|T Command
This is a command that only works in your CONFIG.SYS file, and what it
does is load a device driver into memory. You have to watch what order
you put the DEVICE lines into your CONFIG.SYS file though. For example,
any device that wants to use expanded memory has to come after the line
that loads your expanded memory manager.
The syntax is quite simple. Just remember that you have to include the
full file specification, including the path and the filename's extension,
for the device driver you're trying to load. Since the CONFIG.SYS file
is read during |sboot|sup before COMMAND.COM loads and AUTOEXEC.BAT gets ex-
ecuted, there is no PATH variable in the environment yet so DOS can't
find any file that's not in the root directory of the boo|1t disk. But you
shouldn't keep any |sdevice driver|ss in the root directory of a hard disk.
Put them into a subdirectory to keep your root directory clean. A DEVICE
command should look similar to this:
DEVICE=C:\DOS\ANSI.SYS
<page down> for What Is an Installable Device Driver?
What Is an Installable |tDevice Driver|t?
The computer needs to have a |ndevice driver|n for all the device|1s that you
want it to be able to deal with. The monitor, the keyboard, the disk
drives, the printer, the mouse, the modem, the expanded memory board,
these are just some of the device|1s that get attached to computers (other
than their users). Well the computer has a lot of built-in device dri-
vers, such as the ones for CON, AUX, and PRN. Device|1s that are not used
by all computers at all times need to have a piece of software loaded
during each |sboot|sup, that teaches the computer how to deal with these de-
vices. And these pieces of software are called installable device dri-
vers. (See also TSR.)
You install a |ndevice driver|n into the computer's memory by using a DEVIC|1E
or DEVICEHIGH command in your CONFIG.SYS file before you boot the compu-
ter. Some of the device drivers that come with DOS are RAMDRIVE.SYS,
ANSI.SYS, DRIVER.SYS, HIMEM.SYS, and SMARTDRV.SYS. Don't ever even think
about trying to use a file that has the .COM extension with a DEVIC|1E com-
mand! A file that has the .SYS extension is probably a |ndevice driver|n,
<page down> for more Device Driver
but any other extension, don't do it unless the book tells you to!
All device drivers use up some of your memory. Even the ones that have
switches that make them use extended or expanded memory. For example, if
you use the /E switch to put the RAMDRIVE.SYS |ndevice driver|n into extended
memory, it's only the RAMdisk itself that goes into the extended memory.
The |ndevice driver|n, which you could think of as the |sRAMdisk|s's drive con-
troller, is still in conventional memory. It's very small, however. For
example, mine only uses up 1184 bytes. It's well worth it. Most device
drivers take up very small amounts of memory. But if you use a lot of
them all at once, it does add up. That's why we like to have ways of
putting them into the upper memory area, such as with DOS version 5.0's
DEVICEHIGH command.
<page down> for The |nANSI.SYS|n |nDevice Driver|n
The |tANSI.SYS|t Device Driver
You can do really great things with this console driver, if you install
it in your CONFIG.SYS file. Edit CONFIG.SYS to include this line:
|sDEVIC|1E|s=C:\DOS\ANSI.SYS
(That is assuming you have the |nANSI.SYS|n file in your DOS directory.) And
reboot your computer. Now you're ready to use |nANSI.SYS|n, but what is it?
It's a device driver that allows you much more control over your |sCON|ssole,
or monitor-and-|skeyboard|s. You can change the colors on your screen, or
make your own keyboard macros. This involves using a thing called the
ESCape character. The easiest way to get this character to the screen,
where the ANSI device driver can see it and interpret it, is with the
PROMPT command. One of the metacharacters which are used as parameters
to this command is $e, which will put an ESCape character into your
prompt. Well this is what it's for.
The reason you can't just type the ESC key to get the ESCape character
into a command, is that in DOS, or in most text editors and word proces-
sors, the ESC key has some special meaning. For example, at the DOS com-
<page down> for more ANSI.SYS
mand line, a touch of the ESC key causes DOS to abort the command you
were typing and give you a new blank command line. You need to use some
other method to get the ESCape character into a command or batch file.
To change the color of your screen from the dull drab gray-on-black of
normal DOS, the PROMPT command you'll need is PROMPT $e[1;3x;4ym where 3x
is the foreground (text) color, and 4y is the background color. The col-
lor codes, that take the place of the x and the y, are as follows:
0 black 1 red 2 green 3 yellow
4 blue 5 magenta 6 cyan 7 white
The 1; in that command is for bold text and is optional. (Yellow usually
looks orange unless you use bold.) Notice that the m at the end of that
command must be in lowercase or the command won't work. It's just that
simple to make your screen whatever color you choose. Remember, though,
that this changes the PROMPT variable in the environment, so you lose the
PROMPT statement you had already set up. It'll look like you don't have
a prompt at all anymore. So what you might want to do is add your normal
PROMPT statement to the end of that one, like this:
PROMPT $e[1;3x;4ym$p$g
<page down> for more ANSI.SYS
Now you have both your new color scheme and your old |sprompt|s! Another way
is to use two separate commands, the color changing command, followed by
the regular PROMPT command to get your normal prompt back. This would
save space in the environment, because the longer color command would be
replaced by the shorter normal PROMPT command. If you use this method in
a batch file though, you need to observe the rules mentioned under macros
about the use of multiple PROMPT statements in a batch file.
Now, when ANSI changes your screen colors, it will only change what is
written on the screen from that time on. It will not automatically make
your whole screen change. In order to get the whole screen filled with
your new colors, all you need to do is clear the screen with the CLS com-
mand. Another way to clear the screen is to use the ANSI ESCape sequence
2J. Just add it to the end of your color-changing command:
PROMPT $e[1;32;40m$e[2J
This time the J ANSI command must be in uppercase, as opposed to the m
and p ANSI commands which must be in lowercase. Now remember, if you use
this method of clearing the screen, don't add your normal prompt to the
end of it. You must give a normal PROMPT command separately, and after
<page down> for more ANSI.SYS
that one that includes 2J, or else the screen will be cleared every time
you hit <Enter>, before you get a chance to see the result of the command
you just entered.
Using ANSI to set up |tmacros|t is just as easy! A PROMPT command for that
purpose would look like this:
PROMPT $e[0;68;"|sDIR|s";13p
Notice that the p at the end of that command must be in lowercase or the
command will not work. The number combination 0;68 stands for the <F10>
key, and the 13 stands for the <Enter> key. (See the ASCII subject for
the codes for all the function keys.) Therefore, the above PROMPT would
cause the <F10> key to be reassigned as DIR <Enter>, so every time you
hit the <F10> key, you would automatically get a directory listing. You
can put any command you want into one of these |nmacros|n, even more than one
command into the same macro. Suppose that you like to clear your screen
before you look at a DIR listing. The following command would set up the
<F10> key to do that for you:
PROMPT $e[0;68;"|sCLS|s";13;"|sDIR|s";13p
ANSI will write the parts in quotes exactly the way they are entered.
<page down> for more ANSI.SYS
The parts that are not in quotes are interpreted as decimal ASCII codes.
The quoted strings and the decimal ASCII strings must be separated by
semicolons (;).
Another type of "macro" you can use ANSI for, is rearranging the way your
keyboard is set up. Do you need to use the " a lot more often than the '
and you're tired of hitting the <Shift> key to get to the "? Well, since
the ASCII code for " is 34 and the code for ' is 39, you can do this:
PROMPT $e[34;39p
PROMPT $e[39;34p
Now whenever you hit the ' key you'll get " and then to make a ' you'll
have to use the <Shift> key.
This is not a perfect solution, however, because not all applications
recognize ANSI key reassignments. Some programs will still give you '
whenever you hit ' even though you have " assigned to the ' key. But it
can't hurt to try. Maybe your favorite word processor will let you do
these reassignments. At any rate, the changes will work in DOS for sure.
<page down> for more ANSI.SYS
You can put all your keyboard redefinition |sPROMPT|ss, and your color change
PROMPT into your AUTOEXEC.BAT file or any other batch file. There is one
problem with this, however. Most people like to have ECHO off in their
AUTOEXEC.BAT file, so the screen stays as clean as possible during boot-
up. But when ECHO is off, the PROMPT string is not sent to the screen.
So the ANSI ESCape sequence is not seen by the ANSI driver, so it will
not be acted upon, until the end of the batch file, when DOS automatical-
ly turns ECHO back on. But by then it's too late for all but the last of
the PROMPT strings to be interpreted by the ANSI driver, since each new
PROMPT statement replaces the old PROMPT statement in the environment.
The last PROMPT statement executed is the only one which will be seen by
the ANSI driver, unless ECHO is on while these PROMPT statements are be-
ing sent to the environment. You don't need to leave ECHO on for the
entire batch file, however, just from the line immediately following the
first PROMPT statement, until the line immediately preceding the last
PROMPT statement.
There's an easy way to get around this problem, though, if you have DOS
version 3.3 or later. This version added the @ symbol to the list of
<page down> for more ANSI.SYS
batch file commands, to suppress the display of any line in a batch file.
You still need to have ECHO on for this, but the ugly old PROMPT lines
will not show on the screen. You just precede each PROMPT command with
the @ symbol, and then leave a blank line right after that, then the next
@|sPROMPT|s line, another blank line, etc. After all your @|sPROMPT|s lines and
blank lines, then turn ECHO off for the rest of the batch file. And do
not forget to issue a normal PROMPT command afterward, or else it will
look like you don't have a prompt at all, since any ESCape sequences sent
to the screen are intercepted and interpreted by the ANSI driver before
they get there.
There are other ways to get the ESCape character to the screen, besides
using the PROMPT command, but they aren't really used so much by begin-
ners. The ESC character can be represented by the ^[ keystroke combin-
ation, but in most text editors or word processors, if you enter ^[, the
same thing will occur as what would happen if you hit the <Esc> key. (A
symbol like ^[ always means to hold down the <Ctrl> key while typing [.)
But most text editors and word processors do have a way to enter control
characters into the text. The DOS command EDLIN uses ^V. If you enter
<page down> for more ANSI.SYS
^V followed immediately by the [ character, then the ^[ (ESC) character
will be inserted into the text. When you enter this into EDLIN it's go-
ing to look like this on the screen at first: ^V[[1;31;40m. But if you
later list the file, or save it and edit it again later, you will see
^[[1;31;40m. The V has disappeared! But that's ok, it's supposed to do
that. The ^V was just there to tell EDLIN that the [ was supposed to
mean a ^[, and that's what it did, because now it says ^[. But don't
forget, the ^[ represents only the ESCape character, and the combination
that ANSI will recognize as one of its commands, is ESC + [. The [ needs
to follow the ^[ which stands for ESC, so you need two [ symbols there.
If you have DOS version 5.0, you can use the EDIT command instead of the
EDLIN line editor, because it's easier to use. If you do, ^P + ESC will
do the same thing as ^V + [ does in EDLIN--give you an ESC character.
Different editors use different methods, however, so if you're not using
EDLIN or EDIT, you'll have to check the manual for your editor. Once you
know the method your editor uses to get control characters into the text,
the possibilities are endless. You could create a text file called HELLO
<page down> for more ANSI.SYS
.TXT which looks kind of like this:
ESC[31;40mHi there! (red)
ESC[37;40mHow are you? (white)
ESC[34;40mI am fine. (blue)
ESC[0m (back to normal)
Now when you enter the command TYPE HELLO.TXT, your screen will show that
text (not including the ugly part) in colors! You can also use a similar
technique in a batch file. Just use the ECHO command, like this:
ECHO ESC[31;40mHi there!
And remember, with TYPE and ECHO, you do not need to have ECHO on during
this part of the batch file like you do if you're using PROMPT $e to en-
ter the ESCape character, because these commands will send the string to
the screen even if DOS doesn't send the command to the screen. So just
use TYPE to display a text file that has ESC codes in it, or use the ECHO
command in place of PROMPT in a batch file, with ESC in place of $e.
Another way to get the ESC character into a file is with the CLS command.
<page down> for more ANSI.SYS
Of course, you use the same techniques to get the ESC character into a
file, whether for the purpose of color, or for the purpose of macros.
To un-assign function keys that have been made into macros using ANSI
ESCape sequences, you just reassign them to their normal ASCII code. For
example, if you had the <F10> key reassigned to "|sDIR|s";13, you just need
to reassign it back to <F10>, like this:
PROMPT $e[0;68;0;68p
A few caveats about using ANSI to create macros. First, remember that
DOS has its own functions for the <F1> through <F7> keys, so you don't
want to reassign those. But you can reassign <F8> through <F10>, as well
as <Shift-F1> through <Shift-F10>, <Alt-F1> through <Alt-F10>, and <Ctrl-
F1> through <Ctrl-F10>. (Although if you're using DOS version 5 with the
DOSKEY command, you don't want to reassign any keys that it uses either.)
But not all of them! The |nANSI.SYS|n device driver sets aside only a limit-
ed amount of memory for holding these keystroke redefinitions. I can't
tell you how many keys you can assign, because it'll depend on the length
of each macro you're using. But if you have some keys assigned, and try
<page down> for more ANSI.SYS
to assign one more and it won't work, chances are that it's because that
chunk of memory is full.
One last thing. Don't expect these macros to work anywhere except in DOS
because most programs have their own uses for the function keys, and will
take over control of them while you're in the program. But as soon as
you exit back to DOS, the macros will work again. Some programs will al-
low the ANSI reassignment to work though, and it can't hurt to try.
You can even use |nANSI.SYS|n to create your very own screen blanker, to save
your monitor from having the same image sitting on it for hours burning
permanently into the screen. Let's say you wanted to use F9 to make the
screen blank, and F10 to make the screen come back up again. Just issue
these two ANSI commands:
PROMPT $e[0;67;"BLANK";13p
PROMPT $e[0;68;"BACK";13p
Now create these two batch files, and put them into a directory that's on
your PATH. Here's BLANK.BAT:
@|sPROMPT|s $e[0;30;40m$e[2J
<page down> for more ANSI.SYS
And here's BACK.BAT:
@|sPROMPT|s $e[1;32;40m$e[2J
(leave this line blank)
@|sPROMPT|s $p$g
@|sECHO|s OFF
Now whenever you're at the DOS prompt, if you hit the F9 key, that will
execute the BLANK.BAT file, which sets your screen colors to non-bold
black on black, and clears the entire screen to those colors. Your
screen goes absolutely as black as if the computer were turned off. You
can type whatever you want, and though your commands will execute, noth-
ing will show on the screen. Because everything is being displayed in
black on black. Now hit the F10 key, which causes BACK.BAT to execute,
which puts your screen colors back to bold green on black, clears the
screen to those colors, sets your prompt back to current-drive-and-direc-
tory, and turns ECHO off so that you won't get a double prompt on the
screen when that batch file finishes executing. So everything is back to
normal again.
There are also some other very useful ANSI commands, which are probably
<page down> for more ANSI.SYS
listed in your DOS manual, and now that you know more about the ESC char-
acter, you can probably understand that chapter in the manual. And there
are several shareware clones of |nANSI.SYS|n, such as NANSI.SYS, which work
just the same way only much faster! So check them out and have some fun!
A lot of people will try to tell you that if you want to start using a
modem and |sBBS|ss, you'll need to have |nANSI.SYS|n loaded via your CONFIG.SYS
file in order to be able to receive color graphics. This was true many
years ago, but not any more. Well, there are still a very few older
modem communications programs that support ANSI graphics but not inter-
nally. If you use one of those, then you will indeed need |nANSI.SYS|n in
your CONFIG.SYS file. But programs that require that are very old.
There are also a few communications programs that just don't support ANSI
color graphics at all, and it doesn't matter in the least whether you
have |nANSI.SYS|n in your CONFIG.SYS file, you're not going to get color
graphics with those comm programs. But the vast majority of comm pro-
grams that exist nowadays, support ANSI graphics all by themselves. They
couldn't care less whether you have |nANSI.SYS|n in your CONFIG.SYS file,
they have their own |ninternal|n ANSI support, as long as you tell them to
<page down> for more ANSI.SYS
use ANSI or VT-100 terminal emulation! (Look in your comm program's man-
ual for the words emulation and configuration.) Now if you have one of
those few programs that just won't support ANSI no matter what, or if you
just haven't yet figured out how to configure your comm program to do it,
you want to tell the BBS computer not to be sending you any ANSI graph-
ics. Because if your software doesn't support ANSI and the BBS is send-
ing you the ANSI codes, your BBS screen is going to look kinda like this:
[34;47mMain Menu
[37;42mF[34;42miles Menu [37;42mM[34;42message Menu
[37;42mB[34;42mulletin Menu [37;42mG[34;42moodbye (log off)
because your software isn't intercepting and translating all those ANSI
color control codes, so they're showing up on your screen mixed in with
the text that is supposed to show up.
<page down> for The |nDRIVPARM|n Command
The |TDRIVPARM|T Command
This command is used in the CONFIG.SYS file, but it's pretty rare that
it's needed. It's only necessary if you replace an old floppy drive or
add a new one, that is not supported by the BIOS in your machine or by
your DOS version. It sets the drive characteristics for existing physic-
al drives. If you can read and write disks in your floppy drive but you
can't properly FORMAT brand new disks, then this is probably the command
that will help you.
If you think you need to try this command, check your DOS manual because
the syntax and |sdefault|ss are different for different DOS versions. Also
some brands of DOS don't even support this command. If you can't make
this work, then try DRIVER.SYS which is a device driver that sets up
logical drives inside of physical drives.
If you have DOS version 5.0 and a 720K disk drive, it might FORMAT your
disks to only 360K capacity. If so, put this command in your CONFIG.SYS
file: DRIVPARM=/D:0 /F:2 if your 720K drive is A:, or use /D:1 instead
<page down> for more DRIVPARM
if it is your B: drive. The reason this might be necessary, is if you
have a drive that your BIOS doesn't support, but the version of DOS you
were using had been specially modified to support that drive. Then when
you upgraded to regular old MS-DOS, from the version you had been using,
your special drive support (that you didn't even know you had) isn't
there any more, so now you need the |nDRIVPARM|n command.
<page down> for What Are Logical Drives?
What Are |tLogical Drives|t?
Well, a logical drive is one that doesn't really exist physically, but
that DOS thinks exists. For example, a RAMdisk. That's just a chunk of
memory that DOS has been told to treat like a disk. It has a drive let-
ter, like D: or E:, and you can copy files to it, or read files from it,
but you can't open up the computer's case and put your hand on it. Be-
cause it's a section of memory. So it's not a physical drive, but it is
a logical drive because DOS treats it like a drive.
If you have a very large hard drive and you have it partitioned into more
than one section (that was probably done with |sFDISK|s), each with its own
drive letter, DOS treats those partitions as if they were totally separ-
ate drives, even though they're all right there on the one physical hard
drive. Those are |nlogical drives|n too.
If you have used the SUBST command to tell DOS that you are going to pre-
tend that your C:\WORD\DOCS directory is really drive F:, then that's a
logical drive too. You can't open up your computer's case and find any
<page down> for more Logical Drives
drive F: that's separate from any of your other physical drives, and yet
DOS will let you refer to the files in C:\WORD\DOCS by just using the
letter F:.
What if you have a computer with only one floppy drive, drive A:? How
could you possibly copy files from one floppy disk to another? If you
tried the command COPY A:FILENAME.EXT A:, hoping that DOS would tell you
to put a different disk in the drive to accept the copy, well sorry, but
that's not going to happen. DOS is going to say "File cannot be copied
onto itself". What can you do? Easy. COPY A:FILENAME.EXT B: will do
it. But you don't have a drive B:, you say? Sure you do. Not a phys-
ical one, but a logical one. Whenever you only have one floppy drive DOS
automatically gives you a logical drive B: which is sort of a ghost twin
to drive A:. So you can do lots of operations that require two drives,
and DOS will just tell you at the appropriate moment, whether to put in
the disk for drive A: or the one for drive B:. You put them in the exact
same place, but DOS keeps track of which is which.
Well if you do have a physical drive B:, you can still convince DOS to
<page down> for more Logical Drives
give you |nlogical drives|n to go with your floppy drives like that. With a
device driver called |tDRIVER.SYS|t. You load this contraption into your
CONFIG.SYS file with a DEVIC|1E command, and DOS will set up the logical
drives, and assign the drive letters according to whatever drives you
already have. Suppose you have a hard drive partitioned into logical
drives C: and D:, and you have a RAMdisk E:, and you put the |nDRIVER.SYS|n
in after the line that loads the RAMdisk, then the first logical drive
you set up with |nDRIVER.SYS|n will be F:, the next one will be G:, etc.
Don't ever forget, DOS assigns logical drive letters to |nlogical drives|n on
a first come, first served basis. Every time you boot up, DOS looks to
see how many hard drive partitions you have, and gives them each a letter
starting with C:. Supposing your hard drive has only one partition, then
D: is the next letter available by the time DOS executes the commands in
the CONFIG.SYS file, so the first DEVIC|1E command in CONFIG.SYS that tries
to set up a logical drive, will get the letter D:. Then the next request
for a logical drive from CONFIG.SYS will get letter E: and so forth until
CONFIG.SYS is finished. You can't control the order in which DOS assigns
drive letters to physical drives, because it will always be in alphabet-
<page down> for more Logical Drives
ical order, but by changing the order of the statements in CONFIG.SYS you
can control which |nlogical drives|n will get what drive letters.
Now if you were already using some SUBST commands in your AUTOEXEC.BAT
file perhaps, for drive letters F: and G:, you'll have to change them to
H: and I: if you create |nlogical drives|n in the CONFIG.SYS file that re-
ceive drive letters F: and G:. Because the letters F: and G: are now
going to refer to your floppy drives, so you don't want to use them for
SUBST commands. Also, any batch file that is going to reference those
|sSUBST|situted drives, you have to change those references to H: and I: as
well. Setting up |nlogical drives|n with DRIVER.SYS can affect any logical
drives that you had set up with |sRAMdisk|ss or SUBST commands, so watch what
your batch files say! If you add or remove any |nlogical drives|n, that will
change the drive letters that your other |nlogical drives|n are going to re-
ceive, but your batch files are still referring to the same drive letters
as before, which now are assigned to different |nlogical drives|n, and that's
going to be a real mess unless you update each batch file with the new
drive letter assignments.
<page down> for more Logical Drives
If you use your RAMdisk all the time, and plan to keep DRIVER.SYS in your
CONFIG.SYS file only sometimes, then put the DRIVER.SYS line or lines af-
ter the RAMdisk line. That way, whether you're using the DRIVER.SYS or
not, your RAMdisk keeps its same drive letter all the time. If you put
the DRIVER.SYS before the RAMdisk, then your |sRAMdisk|s's drive letter would
be always changing depending on whether you have the DRIVER.SYS installed
today or not. If you plan to use DRIVER.SYS all the time and RAMdisk on-
ly sometimes, then do it the other way around. Put the RAMdisk after the
DRIVER.SYS, so your "ghost twin" floppies always keep their same drive
letters, whether or not you are using a RAMdisk today. If you do change
the order of the logical-drive-creating commands in CONFIG.SYS, you have
to remember to change every batch file you have that references a logical
drive letter.
Even more important, whether you're using SUBST or not, or using a |nRAM|n-
disk or not, any time you create |nlogical drives|n in any way, DOS needs to
be warned that you are going to be using them. If you're ever going to
end up with a drive F: or a drive J:, you have to have a LASTDRIVE com-
mand in your CONFIG.SYS file to tell DOS how many |nlogical drives|n you're
<page down> for more Logical Drives
going to be using.
Now suppose you do have those drives set up the way I mentioned, so that
when DOS gets to the DRIVER.SYS line in CONFIG.SYS the letters F: and G:
are the next available ones, DOS will assign F: to the first DRIVER.SYS
statement you have, and if you have another one too, it will get G:, and
the next one will get H:, and so forth. If the first one was set up to
match your A: drive then you can do something like COPY A:FILENAME.EXT F:
just like a person without a B: drive can do COPY A:FILENAME.EXT B:. DOS
will tell you when to take out the A: disk and put the F: disk into the
same physical drive. Now you can copy files from one 3.5" disk to anoth-
er even if you only have one physical disk drive of that size. Before
DRIVER.SYS, you could only do that with the DISKCOPY command.
Know what else you can do with |sDRIVER.SYS|s? If your physical drive A: is,
for example, a high density 5.25" drive, you can set up a logical ghost
twin for it that is a double density 5.25" drive, and then you can say
FORMAT F: instead of remembering to say FORMAT A: /F:360 and the disk'll
get formatted to double density even though it's physically being done in
<page down> for more Logical Drives
a high density drive. If you tell DOS that F: is a 360K drive, then DOS
will use the 360K format when you specify drive F:. (Of course that will
not work the other way around. If you have a double density drive, you
can't make DOS pretend that it's a high density drive. A double density
drive just doesn't have the right hardware to read or write high density
disks, no way, no how.)
If you did that, making a double density logical drive twin for your high
density physical drive, you can still use high density disks in that dou-
ble density logical drive! It's only double density for formatting pur-
poses. It's still physically a high density drive, so it can still read
and write high density disks.
If you wanted to, you could even give the exact same |sDEVIC|1E|s=|sDRIVER.SYS|s
command twice in a row, making two extra |nlogical drives|n for one physical
drive. That could be useful for if you have a third floppy drive, which
needs a DRIVER.SYS driver to even work, and then the second DRIVER.SYS
line, for that drive, would set up a logical drive twin for it, so that
you could copy between disks in that drive.
<page down> for more Logical Drives
All right, how do you use |sDRIVER.SYS|s? Well it's not too hard. Here's
the syntax:
|sDEVIC|1E|s=D:\DIR\DRIVER.SYS /D:# /F:#
where D: is the drive where the DRIVER.SYS file is located, \DIR\ is the
directory where that file is located, and here are the switches:
/D:# is the physical drive number that you want the logical drive to be a
ghost twin to. 0 is for drive A:, 1 is for B:, 2 is for the next floppy
drive, etc.
/F:# tells DOS what type of logical drive you're setting up. Here are
the choices: 0 for 360K, 1 for 1.2M, 2 for 720K, 7 for 1.44M, and 9 for
2.88M. The default is 2, so if you're setting up a 720K logical drive,
you can leave out the /F:# switch.
So here's the command you would use to make a 720K logical drive twin for
your 3.5" 1.44M A: drive:
|sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:0
For a 360K logical drive twin for your 5.25" 1.2M B: drive:
<page down> for more Logical Drives
|sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:1 /F:0
For a 1.2M logical drive twin for your 5.25" 1.2M B: drive:
|sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:1 /F:1
Or for a 1.44M logical drive twin for your 3.5" 1.44M A: drive:
|sDEVIC|1E|s=C:\DOS\DRIVER.SYS /D:0 /F:7
Of course all those examples assume that your DRIVER.SYS file is located
in the \DOS directory of your C: drive.
<page down> for The |nFCBS|n Command
The |TFCBS|T Command
This command is used in the CONFIG.SYS file. It tells DOS how many File
Control BlockS to keep available. Only old applications are still using
FCBs. Nowadays File Handles are used instead. That's what the FILES
command in CONFIG.SYS is for. These are the two methods that DOS has
used to keep track of open files, files that are in use at the moment by
some application. |nFCBS|n is the old way, FILES is the new way. DOS's
default setting for |nFCBS|n is 4, and valid values are 1 through 255. You
really won't need to use this command unless you use some application
that tells you in its manual to use this command. The syntax is FCBS=#
where # is the number you want to use.
<page down> for The |nFILES|n Command
The |TFILES|T Command
This command is used in the CONFIG.SYS file, and it tells DOS how many
files can be open or in use at one time. File |thandles|t is the new way
that DOS goes about keeping track of open files, whereas FCBS is the old
way. If you have an application that tells you to have FILES=15 in your
CONFIG.SYS file, and another application that tells you to have FILES=30,
then use FILES=30. Just use the highest number that any of your applica-
tions tells you to use.
The higher the number you give in your |nFILES|n command, the more memory
will be used by the table that DOS sets up to keep track of the file han-
dles, so don't use more than you need. Then again, DOS only uses 39
bytes for each file handle above the default, so having 50 file |nhandles|n
is only going to use up 1638 bytes and that's not very much, so if you
have an application that requires FILES=50, don't let it depress you.
You can have anywhere from 8 up to 255, and the default value that DOS
will use if you don't have a |nFILES|n command in your CONFIG.SYS file, is 8.
<page down> for The |nINSTALL|n Command
The |TINSTALL|T Command
This command is used in the CONFIG.SYS file, to load a TSR into memory.
It can only be used with |sTSR|ss that you don't hotkey into, and that don't
require any help from the command interpreter, because at the time |nCON|n-
FIG.SYS is read, COMMAND.COM (the command interpreter) hasn't been load-
ed into memory yet.
You can use this command for FASTOPEN, GRAPHICS, KEYB, NLSFUNC, SHARE,
and many others, but not all |sTSR|ss.
The advantage of using the |nINSTALL|n command in CONFIG.SYS to load |sTSR|ss,
rather than loading them the normal way from the AUTOEXEC.BAT file, is
that all |sTSR|ss loaded after COMMAND.COM has been loaded, receive a copy of
the environment. This wastes memory. If you load a TSR from CONFIG.SYS,
COMMAND.COM is not in memory yet so there is no environment, so obviously
the TSR can't get a copy of it to waste memory like that.
The only disadvantages of the |nINSTALL|n command that I can think of, are
<page down> for more INSTALL
that it doesn't work for all |sTSR|ss, and that if you're using DOS version
5.0, there is no INSTALLHIGH command, so you can't LOADHIGH any |sTSR|ss that
you load from CONFIG.SYS in this manner. And the |nINSTALL|n command didn't
even exist until DOS version 4.
The syntax is quite simple. Just |nINSTALL|n followed by an equals (=) sign
and then the full |spath|sname for the TSR you want to install:
INSTALL=C:\DOS\SHARE.EXE /F:1024 /L:20
(The /F and /L switches are parameters for the SHARE command, not for the
|nINSTALL|n command.) You do have to include the full |spath|sname for the com-
mand file, unless it is in the root directory of the boo|1t disk, because
at the time the CONFIG.SYS file is read, AUTOEXEC.BAT hasn't been run yet
so the PATH variable in the environment does not exist, so DOS can't find
the file unless it's in the root directory of the boo|1t disk, or unless
you specify the full path on the |nINSTALL|n command line. And you don't
want to leave the command file in the root directory, because that clut-
ters it up. So go ahead and keep the file in a subdirectory and use the
full |spath|sname as in that example above.
<page down> for The |nLASTDRIVE|n Command
The |TLASTDRIVE|T Command
This command is used in the CONFIG.SYS file to tell DOS how many drives
you are going to need to be able to access. The default is E so if you
have five or fewer drives, then you have no need for this command. But
if you already have five drives and you add a RAMdisk or you use the
DRIVER.SYS device driver to create more logical drives, then you need to
use this command to tell DOS you need more drive letters. The syntax is
really simple. LASTDRIVE=F is all there is to it!
It does take memory for DOS to keep track of all your drives (about 100
bytes each), so don't use the command LASTDRIVE=Z (the highest allowed)
unless you really do use 26 drives!
In DOS version 5, the default is not necessarily E. It's one letter
higher than the actual number of physical drives you have. For example,
if you only have two floppy drives and a drive C:, then the default will
be D:. If you have four floppy drives and two hard drive partitions,
then the default will be G.
<page down> for The |nSTACKS|n Command
The |TSTACKS|T Command
This command can only be used in a CONFIG.SYS file. About the only time
you'll ever want to use this command, is to set it like this to save mem-
ory:
STACKS=0,0
But if you ever get an error message such as "Stack overflow", or if your
system locks up when you type too fast, then you'll want to remove that
command again to make DOS use the default values. (The default for 8088
computers already is 0,0 but for 286 or higher, the default is 9,128.)
If you still get that error message, try a command like STACKS=15,128 or
even 20,512 if necessary. Other than 0,0 the other acceptable values are
anywhere from 8,32 to 64,512.
The first number means number of stacks, and the second means number of
bytes in each stack. 9,128 means 9 and 128, not nine thousand one hun-
dred twenty-eight.
<page down> for more STACKS
So what is this "stacks" stuff anyway? Well every time you hit a key on
the keyboard, that generates a hardware |tinterrupt|t. Every time a bit of
data comes across your modem, that generates an |ninterrupt|n. Each time the
floppy disk controller says, "Ok, I'm done writing that file you told me
to write", that's an |ninterrupt|n. The computer has to have a place to put
what it's working on, so that it can handle the |ninterrupt|n and go back to
what it was doing before, and that place is what the stacks are.
In case a software program you're using doesn't have enough stack space
built into it, the computer will need for DOS to have some stack space
set up. If a stack overflow occurs, generally that's going to lock up
the computer tighter than a drum, and the only thing you'll be able to
do is reboot. The very next thing you'll want to do is edit your |nCON|n-
FIG.SYS file to allocate some more stack space, and then reboot again
to make the new CONFIG.SYS file take effect, so it doesn't happen again.
<page down> for The |nSWITCHAR|n Command
The |TSWITCHAR|T Command
This command only existed in DOS versions 2.0 and 2.1, and it could be
used in the CONFIG.SYS file to tell DOS what character you want to use
for switch parameters. For example, if you used the UNIX operating sys-
tem a lot, that system uses a - for a switch character. Then when you
use DOS you would have to get used to using / instead. Well if you put
the command SWITCHAR=- into your CONFIG.SYS file, then you could say DIR
-P instead of DIR /P and it would be more like the UNIX system you were
used to. If you don't have DOS version 2, then you can't use this com-
mand. And if you aren't used to some other operating system besides DOS,
then you have no need for this command!
<page down> for The |nSWITCHES|n Command
The |TSWITCHES|T Command
This command was introduced with version 4 of DOS, and it can be used in
the CONFIG.SYS file to make DOS treat an |nextended|n 101-key keyboard like a
|nconventional|n 84-key keyboard. If you're running a program that doesn't
like your |nextended|n keyboard, try the command SWITCHES=/K in your CONFIG
.SYS file and reboot. Now DOS will totally ignore the scan codes passed
by those extra keys, and use the scan codes for their matching regular
keys instead, so they can't confuse your application or cause your system
to crash anymore. What I mean by that is if you hit the <*> key over on
the numeric keypad, DOS will ignore that scan code and use the code for
the <*> key over on the regular part of the keyboard. If you use this
command and also install the ANSI.SYS device driver, use the /K switch
with ANSI also, as in:
|sDEVIC|1E|s=C:\DOS\ANSI.SYS /K
<page down> for The |nSHELL|n and |nSET|n |nCOMSPEC|n Commands
The |TSHELL|T and SET |TCOMSPEC|T Commands
Many experts say that it is just good sense to have a "clean" root direc-
tory. That means you want to have the smallest possible number of files
in the root directory. Many people will try to tell you that COMMAND.COM
is one of the files that must remain in the root directory, but this is
just not true.
When you boot your computer, the first files loaded into memory are the
Hidden files, which are named |tIO.SYS|t and |tMSDOS.SYS|t if you use MS-DOS, or
|tIBMBIO.COM|t and |tIBMDOS.COM|t if you use PC-DOS. (These two Hidden files
must be in the root directory of the boo|1t disk, and in most versions of
DOS they must be the first two files stored on the disk, or they will not
be found and you will receive the "|sNon system disk|s replace and strike any
key" message which means the computer is not going to boot up!) Next, a
file called CONFIG.SYS (which must always be in the root directory in
order for DOS to find it) is read, then COMMAND.COM is loaded. DOS looks
in the root directory to find COMMAND.COM.
<page down> for more SHELL and COMSPEC
However, if there was a |nSHELL|n statement in CONFIG.SYS, then DOS will in-
stead search the directory indicated there! Next, COMMAND.COM reads and
executes each line of your AUTOEXEC.BAT file, if one is present in your
root directory. After this process is complete, you are greeted by a DOS
prompt and that's the end of the boot sequence.
Now if you run a program which requires a great deal of memory, the tran-
sient portion of COMMAND.COM will drop out of memory, to leave room for
this program. Therefore, the first thing that DOS needs to do when you
exit from this program, is to reload COMMAND.COM. However, this reload-
ing cannot use the |nSHELL|n statement in CONFIG.SYS to find the directory
where COMMAND.COM resides. CONFIG.SYS can only be read by DOS during
|sboot|sup. But DOS knows that it should check the environment for a vari-
able called |nCOMSPEC|n. The |nCOMSPEC|n variable tells DOS where to look to re-
load COMMAND.COM, whereas the |nSHELL|n statement tells DOS where to look to
find COMMAND.COM during |sboot|sup. Therefore you need both of these items
if you want to move COMMAND.COM out of the root directory.
There are two ways to set this |nCOMSPEC|n environment variable:
<page down> for more SHELL and COMSPEC
1. The SET |nCOMSPEC|n statement in the AUTOEXEC.BAT. You could also enter
this command from the command line if you ever want to. Here it is:
SET COMSPEC=C:\DOS\COMMAND.COM
(That is assuming that DOS is the name of the directory to which you have
moved COMMAND.COM.)
2. The |nSHELL|n statement in CONFIG.SYS. Most people will tell you that
the |nSHELL|n statement should look like this:
SHELL=C:\DOS\COMMAND.COM /P
However, this will not set the |nCOMSPEC|n variable in the environment. With
just a slight change to the |nSHELL|n statement, though, like this:
SHELL=C:\DOS\COMMAND.COM C:\DOS /P
the second occurrence of the name of the directory will tell DOS to set
the |nCOMSPEC|n variable. It seems redundant, but it is necessary to do
this, or when you exit a large program you will receive this message:
"|tInvalid COMMAND.COM|t system halted", because if the |nCOMSPEC|n variable is
set incorrectly, then DOS has no way of finding COMMAND.COM. There is
nothing you can do about that except reboot.
So remember, you can move COMMAND.COM out of the root directory and into
<page down> for more SHELL and COMSPEC
a subdirectory, but only if you use the "long form" of the |nSHELL|n command
in CONFIG.SYS, or else the |nCOMSPEC|n statement in AUTOEXEC.BAT along with
the "short form" of the |nSHELL|n statement. But which one of those should
you use? Well, it doesn't really matter. Actually I'd say use the short
form of |nSHELL|n, and then do your |nCOMSPEC|n setting in the AUTOEXEC.BAT file,
after all your |sTSR|ss are loaded. That would save you four bytes of memory
for each TSR you use. (Because by default, the environment will say
COMSPEC=C:\COMMAND.COM so the four extra bytes come from the characters
"DOS\".) If you're scrimping for memory, you never want to add any
strings to the environment until all of your |sTSR|ss have been loaded, be-
cause each TSR gets a copy of what's in the environment, causing each TSR
to take up more memory than it needs.
If you do not move COMMAND.COM from the root directory, you do not need
the |nSHELL|n statement, unless you want to increase the size of your envir-
onment. If you receive an "Out of environment space" message, you will
need this line in your CONFIG.SYS file:
SHELL=C:\COMMAND.COM /E:nnn /P
where nnn = the number of bytes (for DOS 3.2 or later) or the number of
<page down> for more SHELL and COMSPEC
16-byte paragraphs (for DOS 3.1) of environment space you would like to
have. In this case, you do not need to specify the directory name where
COMMAND.COM is, twice, since COMMAND.COM is in the root directory, so
|nCOMSPEC|n will be set automatically. The purpose of this form of the |nSHELL|n
line is only to enlarge the environment.
Of course, if you do have COMMAND.COM in a subdirectory, and you need
more environment space also, you can combine those statements like this:
SHELL=C:\DOS\COMMAND.COM C:\DOS /E:nnn /P
About the size of the environment you want to set: The default is 160
bytes (except for DOS version 5, where the default is 256 |sbytes|s), so if
you've run out of space, obviously you need a higher number than that.
The highest number you can use is 32,767. A good setting is 256 bytes.
Don't increase it over that unless you run out of space with that set-
ting. Also, the number of bytes in the environment must be a multiple of
16, or DOS will "round up" and give you a multiple of 16 anyway. And if
you have DOS 3.1, remember to use the number of 16-byte paragraphs, rath-
er than the number of bytes.
<page down> for more SHELL and COMSPEC
By the way, the purpose of the /P is to cause COMMAND.COM to be the pri-
mary command interpreter, as opposed to being a secondary shell which can
be exited from. (See shelling out.) The primary shell runs AUTOEXEC.BAT
whenever it is done loading. If there is no |nSHELL|n statement, AUTOEXEC
.BAT will be called anyway. But if there is a |nSHELL|n statement, then
AUTOEXEC.BAT will only be called if the /P switch is on it. Now the fact
that /P causes COMMAND.COM to be the primary shell, is quite important.
If you left out the /P in the SHELL statement, and you accidentally typed
EXIT at the DOS prompt, then COMMAND.COM would drop out of memory and you
wouldn't be able to do anything except reboot.
One more thing about the |nCOMSPEC|n environment variable. The default set-
ting is the root directory of the disk you |sboot|sed from, unless you tell
DOS otherwise. So if you have a hard drive, but you sometimes boot from
a floppy disk, then when you do, you'll probably want to issue a command
such as SET COMSPEC=C:\DOS\COMMAND.COM depending on where your COMMAND
.COM file really is, so that DOS will use that copy instead of always
asking you to "Place disk with COMMAND.COM into drive A:" every time you
exit from a large program after having |sboot|sed from the floppy drive.
<page down> for The |nPATH|n
The |tPATH|t
A |npath|n in DOS is just the road that DOS would have to follow through the
directories, in order to find a file that you want it to find. For a
file named FOO.BAR in the subdirectory called ABC which is a subdirec-
tory of the subdirectory called DEF which is a directory on the D: drive,
(got that?) the full filespec for that file would be D:\DEF\ABC\FOO.BAR,
and the \DEF\ABC\ part is the |npath|n for that file.
When you type in a command at the DOS prompt, if you have not specified
the |npath|n to the command file on the command line, and if the command is
not an internal part of COMMAND.COM, then DOS will search the current
directory for the file, and if it's not there, DOS will search each dir-
ectory listed on the |nPATH|n variable in the environment. When you first
boot up your computer, the |nPATH|n variable looks like this:
PATH=
It's not set equal to anything! (You can use the SET command to view the
strings that are in the environment.) Therefore, any external command
that's not in the current directory (unless you've specified the correct
<page down> for more PATH
|npath|n on the command line), will not be found, and you will receive the
famous "|sBad command or filename|s" message. What you need to do is put a
|nPATH|n statement into your AUTOEXEC.BAT, which lists all the directories
where your most common commands reside. That way, DOS will know where
to look to find these command files in order to execute them, even if
you are not currently in the directory where they reside.
All of your DOS commands that came with your computer should be in a dir-
ectory called DOS. This should be one of the first directories listed on
your |nPATH|n. DOS searches the directories in the order in which they are
listed on the |nPATH|n statement. So you don't want the directory which con-
tains your most commonly used commands at the end of the |nPATH|n statement,
because this will increase the time it takes for DOS to find the command
file.
Why don't you just put all of your directories on the PATH? Three rea-
sons: First, the entire |nPATH|n statement, including PATH=, can only be 127
characters long! Second, most programs don't know how to find their com-
panion files using the |nPATH|n statement, and those programs that don't know
<page down> for more PATH
how to use an environment variable either, to find their companion files,
won't be able to find their companion files unless the files are in the
current directory. Therefore, there would be no purpose in having this
directory on the |nPATH|n, since if you start the program from another direc-
tory, the program won't be able to run anyway. For this type of program,
you have to change to the program's directory before you run it, and that
is all there is to it! Third, the longer the |nPATH|n statement, the longer
it will take DOS to search all the directories on it, in order to find a
command file that you've asked it to execute! A batch file is a very
simple and effective way to avoid having a long |nPATH|n variable.
Here's an example of a |nPATH|n statement:
|nPATH|n C:\DOS;C:\UTIL;C:\DOS\BIN
Notice that each directory specified is separated from the others with a
semicolon (;). And always include the full directory specification for
each directory, including the drive letter, as above, instead of some-
thing like |nPATH|n \DOS;\UTIL;\DOS\BIN, because if the drive letter is not
included, then when you have A: as your current drive, your |nPATH|n won't
work at all, because DOS will be searching on A: for the \DOS, \UTIL, and
<page down> for more PATH
\DOS\BIN directories, which don't exist on drive A:. They're on C:.
Notice that in most cases, you need to use the SET command to set an en-
vironment variable, but for |nPATH|n and PROMPT, the set command is not re-
quired. Also, on some systems, an equals (=) sign is required between
|nPATH|n and the rest of the statement. So if something like |nPATH|n C:\DOS;
C:\ABC won't work on your system, use PATH=C:\DOS;C:\ABC instead. There
must never be any spaces in the |nPATH|n statement, except between |nPATH|n and
the rest of it, and there should not be a semicolon (;) after the last
directory name!
Remember, though, that a |nPATH|n statement is never a requirement. It is
only a time-saver for you. DOS could just as easily find any command
file if you were to include the full file specification for the command,
on the command line. For example, if you have a file named EXPLOSIV.COM
in the \UTIL directory of the C: drive, and C:\UTIL is not on your |nPATH|n,
you can enter the command as C:\UTIL\EXPLOSIV rather than just EXPLOSIV.
<page down> for The |nPROMPT|n
The |tPROMPT|t
You know the |nprompt|n that appears on your screen whenever DOS wants to
know what you want to do next. It looks like this:
C>
Boring, isn't it? But did you know that you can make the |nprompt|n say any-
thing you want it to say? With the |nPROMPT|n variable in the |senvironment|s!
If you type this at the command line:
|nPROMPT|n Hello
Then your |nprompt|n will be
Hello
instead of the usual C>. Notice that in most cases, you need to use the
SET command to set an environment variable, but for PATH and |nPROMPT|n, the
SET command is not required. Also, on some systems, an equals (=) sign
is required between the word |nPROMPT|n and the rest of the statement. So if
|nPROMPT|n Hello doesn't work on your system, use PROMPT=Hello instead.
There are many special symbols you can use to get special characters into
your |nprompt|n:
<page down> for more PROMPT
$$ a $ symbol $_ a carriage return
$b a || symbol $d the |ncurrent|n date
$e an ESCape character $g a > symbol
$h a backspace character $l a < symbol
$n the current drive $q a = symbol
$p the current directory $t the |ncurrent|n time
$v the DOS version $ (space + $) a trailing blank
The most commonly used |nPROMPT|n metacharacters are $p$g. This |nprompt|n shows
what your current directory is at all times. For example if your current
directory is C:\DOS, then your |nprompt|n will be C:\DOS>. If you change to
the C:\UTIL directory, using the CHDIR command, then the |nprompt|n immedi-
ately changes to C:\UTIL>. You almost always want to use this as part of
your |nprompt|n if you're using a hard disk, so you never forget where you
are. The only problem with this |nprompt|n is that it causes DOS to look at
your disk after every command, to see what the current directory is, so
that it can display the current |sdirectory|s's name. Well the reason this
can be considered as a problem, is that if you switch the current drive
to a floppy disk, using the A|1: or B: command, before you put a disk into
<page down> for more PROMPT
that drive, you'll get an "|sAbort, Retry, Fail, Ignore|s" message. It also
really slows things down on a floppy drive, because it takes DOS so much
longer to look at a floppy disk than to look at a hard disk.
So whenever you're about to switch over to work on a floppy disk for a
while, you might want to issue the |nPROMPT|n command all by itself, with no
parameters. What that will do is to reset the |nprompt|n to the default (the
|nprompt|n that DOS would normally use unless you gave it some other |nPROMPT|n
command), which is just the equivalent of $n$g, which only shows the cur-
rent drive, instead of the current drive and directory. That way, DOS
doesn't have to look at the disk after each command to read the current
|sdirectory|s's name. And your |nprompt|n will just look like A> or C>.
For more information on great things you can do with the |nPROMPT|n command,
see the section about ANSI.SYS.
One concern that comes up quite frequently, is that a body sometimes gets
a double |nprompt|n on his screen after running a batch file. By that I mean
that the |nprompt|n looks like this:
<page down> for more PROMPT
C:\DOS>
C:\DOS>_
There are four things that I can think of right off the bat, that can
cause this little annoyance. First, most any batch file that doesn't
have "|sECHO|s OFF" in it, will do that. Second, a lot of people have the
mistaken impression that they have to turn ECHO back on at the end of a
batch file. Not true. DOS turns ECHO on at the end of every batch file
whether the command is given or not. The only thing an "|sECHO|s ON" line at
the end of a batch file does, is to take an extra couple of milliseconds
to process the batch file, and to cause that nasty double |nprompt|n display.
One other thing that can cause it, is having an extra carriage return
(the <Enter> key) after the last line of the batch. And finally, if none
of these seems to be the problem, you can just use EDLIN to remove the
carriage return from the last command in the batch file. To do that,
just retype the line and hit the <F6> key before you hit the <Enter> key.
That'll do it. But it's not a good idea. You really want all your batch
files to end with a carriage return. (Not more than one, though.) So
try not to put your F6 or <Ctrl-Z> before the <Enter> key. There are
problems that can be caused by doing that.
<page down> for The |nEnvironment|n
The |tEnvironment|t
(See also SHELL for instructions on how to enlarge the |nenvironment|n.)
The |nenvironment|n is a sort of a scratch pad that DOS and many applications
programs know how to use for certain purposes. Certain functions of DOS
know that if they need some information, this information can possibly be
found in the |nenvironment|n, and memory is set up in such a way that these
functions know where to look to find the |nenvironment|n. So, if you set
these information variables in the |nenvironment|n, then the information will
be there when it is needed.
The variables that DOS can use are COMSPEC, PATH, and PROMPT. Also any
batch file can use variables that have been placed into the |nenvironment|n
using the SET command. Many programs are written so that they know to
look for a certain variable in the |nenvironment|n. For example, many pro-
grams need to use files other than the main executable program file while
they're running. Programs will look for these files in the current dir-
ectory, whatever directory you were in when you first loaded the program.
<page down> for more Environment
Some programs though, know that if the files are not located in the cur-
rent directory, they may be located in a directory specified by a certain
variable in the |nenvironment|n. So if you have previously set that particu-
lar variable to be equal to the directory where these files are located,
then the program will be able to find these overlay files.
Suppose the manual to your word processor says that the program knows how
to search for files in a directory specified by a WORD variable. And
suppose all your word processing files are in a directory called WP.
Then what you want to do is put the line SET WORD=C:\WP into your AUTO-
EXEC.BAT file or into the batch file you use to start that program. Now
your word processor will always be able to find its files, even if you do
not change to the WP directory before you start the program. If a pro-
gram uses |nenvironment|n variables in this way, it will be mentioned in the
installation chapter of that program's manual.
DOS version 5 uses two more |nenvironment|n variables than previous versions.
The DIRCMD variable which relates to the DIR command, and the TEMP vari-
able which is for redirection and for the DOSSHELL.
<page down> for The |nSET|n Command
The |TSET|T Command
This command is used to place variable strings into the environment. The
syntax is |nSET|n VARIABLE=VALUE and the variable name will be changed to up-
percase, but the value will be placed into the environment in the same
form it is entered (except for in the case of the PATH variable, because
there all of the directory names will be uppercased). The value and var-
iable name can include any alphanumeric characters.
You can also use the |nSET|n command, with no parameters, to see what strings
are already in the environment. To remove a variable from the environ-
ment, just set it equal to nothing, like this:
|nSET|n VARIABLE=
If you use the |nSET|n command to set a variable that already exists in the
environment, the new string replaces the old string. There is no way
outside of a batch file, to add another string to the end of a string
that's already there, without retyping the part that's already there.
<page down> for The |nEXPAND|n Command
The |TEXPAND|T Command
This command is new with DOS version 5.0, and if you install DOS properly
using its own SETUP program, you'll probably never need to use this com-
mand. You may have noticed that most of the filenames on the disks in
the upgrade package are missing the last character of their extensions.
For example, all the .COM files have an extension of .CO_. Well the
files are also compressed, so that they take up less disk space. They
are not usable at all in this format. The |nEXPAND|n command can put them
back to their normal usable form.
Here's an example of the syntax you use:
|nEXPAND|n A:\HIMEM.SY_ C:\DOS\HIMEM.SYS
That will take the compressed HIMEM.SYS file from the disk in drive A:,
expand it to its usable form, and give it its proper name, and put it in
the \DOS directory on drive C:. So if you accidentally deleted the HIMEM
.SYS file from your \DOS directory and you couldn't get it back with the
UNDELETE command, or if you had QEMM installed when you installed DOS 5.0
so the SETUP procedure didn't install the HIMEM.SYS file to begin with,
<page down> for more EXPAND
that's how you can get it back.
If you need to expand more than one file from the original DOS disks, you
can do something like this:
|nEXPAND|n A:\HIMEM.SY_ A:\EMM386.EX_ A:\ATTRIB.EX_ C:\DOS
That command will expand all three of those files from the original DOS
disks, but it will put them into the C:\DOS directory with the same sil-
ly names they have now. You'll have to use the RENAME command to make
them usable. You can't specify the full filenames for the |nexpanded|n files
if you expand more than one file at at time. And you can't use wildcards
with this command at all.
<page down> for The |nFDISK|n Command
The |TFDISK|T Command
This command is used to create, delete, or change hard drive |tpartition|ts
and to create, delete, or change logical drives within a |npartition|n. Par-
titions and logical drives on a hard drive just make it so that you can
have a C: drive and a D: drive and an E: drive, or whatever you want, in-
stead of having a great big C: drive by itself. |nFDISK|n just divides the
hard drive into different sections, and DOS references each section with
a different drive letter, even though it's really still part of the same
physical hard drive.
If you have an MS-DOS or PC-DOS version earlier than 4.0, then you can't
have any hard drive |npartition|n larger than 32 mega|sbytes|s. If you have ver-
sion 4 you can have a larger |npartition|n but you have to install the SHARE
TSR every time you boot your computer. If you have version 5, you can
have whatever size partitions you want without using SHARE.
A |npartition|n that's smaller than 16 megs will have a 4K cluster size, and
that's not good. Because every file on the disk, even a tiny batch file
<page down> for more FDISK
that's only 27 bytes long, will use up a whole cluster of disk space. A
partition larger than 16 megs will have only 2K in each cluster, so that
way you only waste half as much disk space with a tiny file. Unless the
partition is too large, that is, like over 128 megs, because those par-
titions also have the 4K cluster size, or even larger!
Don't ever forget that if you change anything about a logical drive or
a partition, with the |nFDISK|n command, every single speck of data on that
logical drive or partition will be lost. Make sure you have a perfectly
good BACKUP before you do anything with |nFDISK|n other than just switching
the active partition or displaying partition information. Anything under
the Create Partition or Delete Partition menu entries will remove all the
data from the partition involved, and from the ones with higher letters.
Another thing that happens when you create or delete logical drives or
partitions, is that drive letters change. For example, if you have a C:
drive and a D: drive, and you use a RAMdisk whose letter is E:, and then
you use |nFDISK|n to remove your D: partition and put the entire drive space
into C:, then the next time you reboot, your RAMdisk will have the letter
<page down> for more FDISK
D: instead of E:, because a RAMdisk just gets the next letter in order
after whatever real drives you have. So you'll need to change all your
batch files that reference the RAMdisk to make them say D: instead of E:.
If your hard drive came with its own partitioning software, then use it
instead of the |nFDISK|n command.
After you've changed any partition on your hard drive, you must FORMAT it
before it can be used. And if you're going to Low-Level Format your hard
drive, then that must be done before the |nFDISK|n procedure.
To enlarge a partition, you must delete it and then recreate it.
The |nFDISK|n command won't let you delete a partition without your entering
the correct volume label, so if there's something funky about your label
and |nFDISK|n won't accept the label as you type it, exit back to DOS and use
the LABEL command to change the label to something else that |nFDISK|n will
accept, and then try |nFDISK|n again.
<page down> for more FDISK
You can only actually have two |spartition|ss on a drive, but you can set up
as many logical drives as you want inside the second partition.
<page down> for The |nFORMAT|n Command
The |TFORMAT|T Command
What on earth is this |nFORMAT|n command that most DOS manuals expect you to
understand with very little explanation? The manuals say that it pre-
pares a disk for use by DOS. Well what does that mean? It can be visu-
alized like the lines on a parking lot. A person knows how to park a car
even when there are no lines at all. However, DOS isn't that smart. DOS
cannot even begin to think about parking a file on a disk, unless it can
see the lines on the parking lot! The |nFORMAT|n command is what paints the
lines there. That's why a disk can't be used until it's been formatted.
The only exceptions to this are the DISKCOPY command, which copies the
entire source disk, including the format, so the target disk need not be
formatted first, and some versions of BACKUP programs, which can call the
|nFORMAT|n command to format the disks during the BACKUP process.
Don't forget that if there are any files on the disk, the |nFORMAT|n command
will wipe out all the directory entries for all the files. Your files
will basically be gone. There are hard drive utility packages such as
<page down> for more FORMAT
Central Point's PC Tools and Symantec's Norton Utilities that can get the
files back for you, and also in DOS version 5.0 there is an UNFORMAT com-
mand, but it's a lot easier to just not format a disk, than it is to un-
format it. Before you format any disk that's been used before, be sure
to check the directory to see if there's anything you might want to save.
Formatting |tfloppy|t disks can get kind of tricky sometimes. You need to
understand the differences among all the different types of |nfloppy|n disks.
Right now there are only four types that are the least bit popular. They
are 360K, 720K, 1.2M, and 1.44M.
A 360K disk holds 362,496 bytes of data. The physical size of such a
disk is 5.25 inches, and the disk is enclosed in a really flimsy plastic
cover. Another name for it besides "360K" is DSDD or 2S2D which means
Double-Sided, Double-Density.
A 720K disk holds 730,112 bytes of data. This type of disk is 3.5 inches
in size, and it is enclosed in a nice hard sturdy plastic shell. It can
also be referred to as a DSDD or 2S2D disk, which is the same thing that
<page down> for more FORMAT
a 360K disk can be called. So you have to watch out for what size you're
buying, as well as what density.
A 1.2M disk is a DSHD (High-Density) 5.25-inch disk. It holds 1,213,952
bytes of data. And a 1.44M disk is a DSHD 3.5-inch disk which holds
1,457,664 bytes of data.
Some manufacturers write things like "2M" on a box of 1.44M disks, or
"1M" on a box of 720Ks, but they're not giving you any more space than
the other manufacturers do! They're just trying to make you think they
are. The "2M" means the capacity of the disk before it is formatted!
When a disk is formatted it gets a |nboot|n record, a FAT, a root directory,
some |ssector|s headers, and things like that so that DOS will be able to
work with the disk. Once a "2M" disk has been formatted, it has 1.44M of
space left for data, just like any other DSHD 3.5-inch disk. Don't let
those marketing departments fool you!
A HD (High Density) disk drive can read and write either HD or DD disks,
but a DD (Double Density) drive can only use DD disks. In fact, most DD
<page down> for more FORMAT
drives can't even read a DD disk if it was formatted by a HD drive. The
way to transfer data between a HD drive and a DD drive, is by formatting
the disk that will be used, on the DD drive, then writing to it on the HD
drive. Then the DD drive will usually be able to read it.
Unless you tell it otherwise, the |nFORMAT|n command will format a disk to
the highest capacity the drive supports. For example, if you don't tell
|nFORMAT|n any particular size switches, a HD drive will format any disk to
HD capacity. (If it's a disk that's only rated for DD capacity, you're
likely to get an error message like "|tTrack 0 bad|t, disk unusable".) If
you're trying to format a disk to HD capacity, make sure it's a HD disk!
If you're trying to format a DD disk, all you have to do is tell the FOR-
MAT command that's what you want to do.
You can format a DD disk to its DD capacity in a HD drive, but only if
you use the correct switches with the |nFORMAT|n command. Here's where it
gets complicated. If you have DOS version 4 or higher, you just say:
|nFORMAT|n A: /F:720 or |nFORMAT|n A: /F:360
to format the disk to the desired capacity. But before DOS version 4,
<page down> for more FORMAT
it was not so easy!
Under DOS version 3 you can use the command:
|nFORMAT|n A: /4
to format a 360K disk in a 1.2M drive. But that one won't work to format
a 720K disk in a 1.44M drive. For that, you have to use the command:
|nFORMAT|n A: /N:9 /T:80
Of course this only works in DOS version 3.3, since before that, there
was no such thing as a 1.44M drive anyway.
Well, that wasn't really so hard after all, was it? The only hard part
is memorizing something like /N:9 /T:80. You can write a batch file that
will remember those switches for you, and name it 720K.BAT or something.
It's really a very bad idea to try to format a disk to some capacity oth-
er than what it was made for. In some cases it can be done, but even if
it seems to work, it is not reliable. The data might sit on such a disk
for a couple years if you're really lucky, but suddenly it will just dis-
appear, and of course that will happen right when you need that data the
<page down> for more FORMAT
most. So if you want to format a disk to High Density, buy a High Den-
sity disk. If you want to format a disk to Double Density, buy a Double
Density disk. Of course if you only have a Double Density drive, then
you don't have to worry about this--DD disks are the only kind that your
drive will even try to read.
If you want to assign a volume label to the disk as soon as it's format-
ted, you include the /V switch on the command line, and when formatting
is complete, DOS will ask you what you want the label to be. With DOS
version 4 and later, DOS is going to ask you at the end, what you want
the volume label to be, whether you include the /V switch in the command
or not. So the only reason to use the /V then, is if you want to tell
DOS in advance, what the label will be, so that DOS won't stop and ask
you. You just put the label on the /V switch like this: /V:WHATEVER and
DOS will automatically put that WHATEVER label onto the disk.
If you want the disk to be |sboot|sable, you format it with the /S switch.
You can reformat and reuse disks as many times as you want, but there's
<page down> for more FORMAT
one thing to be careful of. If you reuse a disk you're probably going to
want to change the paper label that's on the outside of the disk. For
goodness' sake, if it's a 5.25" floppy disk, do not use a hard ballpoint
pen or a pencil or anything to write on any label that's on the disk.
Use a felt-tip pen or write on a new label and put the label on the disk
after you write on it. And don't ever put a disk in the drive if its
label is coming loose because it can get stuck and come off in the drive.
It's perfectly normal to get a few |tbad sector|ts when formatting a disk.
Almost every hard drive in the world has some, and it's not that rare for
a floppy to have a few. Sometimes if you reformat the disk, the bad sec-
tors will be cleared up, sometimes not. DOS marks the bad |ssector|ss off in
the FAT as if they were already in use, so that your data won't get
stored there. If CHKDSK tells you that you have bad |ssector|ss, those are
the ones that have already been marked as bad. There is no danger in-
volved here. Those |ssector|ss won't be used for your data because the disk
already knows they are bad. The only problem with bad |ssector|ss, is when
they are not already marked as bad. CHKDSK won't know about those, and
DOS will put data into them. There are only two ways in DOS to get bad
<page down> for more FORMAT
|ssector|ss marked. The |nFORMAT|n command, and the RECOVER command. Other than
those, there are tons of third-party utilities such as PC Tools's DISKFIX
and Gibson's SpinRite. Some people will try to tell you that CHKDSK can
fix |sbad sector|ss, but it can't. Not even close. CHKDSK doesn't touch any
part of a disk except the FAT and the directories. It can't go near the
data area of the disk, so it can't tell any unmarked |sbad sector|ss exist!
Starting with DOS version 4.0, every disk that gets formatted gets a ser-
ial number, which is a unique number that the computer picks based on the
time of the system clock. This number will be displayed whenever you use
the DIR or CHKDSK commands, and can be used by some programs which were
written to be able to use it, to make sure that the correct disk is in
the drive. Why? Well imagine that the program is storing some informa-
tion in memory and you take a disk out of the drive and put a different
one in. Well if the program doesn't notice that you changed disks, and
it writes that data from memory to the disk, it could trash the FAT of
that disk. If the program checks the serial number first, and sees that
you changed disks, then it won't do such a lousy rotten thing. Instead,
it will tell you to put the first disk back into the drive.
<page down> for more FORMAT
The rest of this section is about the changes in DOS version 5.0's FOR-
MAT command, so if you don't have version 5, don't pay too much attention
to this or you might get confused about what your version of DOS is cap-
able of. Check it out to see what you're missing, though.
DOS version 5.0's new |nFORMAT|n command does a "safe" format, which means
that it does the same thing the MIRROR command does, namely it stores a
copy of the disk's FAT and root directory in a little file named |nMIRROR|n
.FIL, before it formats the disk. Then if you realize ten minutes later,
before you've written any more data to that disk, that it was the wrong
disk and you didn't mean to format that one, you can use the UNFORMAT
command to put it back the way it was right before you formatted it.
This "safe" format is what DOS will use if you don't specify the /U
switch and if you don't try to reformat a disk to a different capacity
than that at which it was originally formatted. (You don't need to have
the |nMIRROR|n.COM file available to make this work though, because the app-
licable parts of that command's code are inside the |nFORMAT|n.COM file.)
The first new switch for the DOS version 5.0 |nFORMAT|n command is /Q. That
<page down> for more FORMAT
stands for quick format. The FAT and root directory are treated just
like normal, but no surface scanning is done. Normally the |nFORMAT|n com-
mand checks for |sbad sector|ss on the disk and if any are found, they are
marked as bad in the FAT so that DOS will never try to store any of your
data in those spots. But |nFORMAT|n /Q skips this step. Therefore, you
should never use this switch with a brand new disk, and you should never
use it on a disk from which you have received any read errors.
Then there is the /U switch which stands for unconditional, but it would
really make more sense to think of it as standing for unsafe. Because
this switch causes the |nFORMAT|n command to not run the MIRROR program, so a
disk that's been formatted with the /U switch can't be |sUNFORMAT|sted. The
/U switch should always be used for brand new disks, because this'll make
the process go a lot faster and work a lot better.
The /F switch is not new to version 5, but one of its parameters is. You
can use /F:2.88 to format a 2.88M disk if you have one of the new disk
drives that support that size.
<page down> for more FORMAT
If you're formatting a previously-used disk that was very full, and you
don't use the /U switch, DOS is going to try to save the FAT and root
directory data to a Hidden |nMIRROR|n.FIL file on the disk, but it won't have
room. It will tell you there's not enough room, and ask you if you want
to go ahead and format the disk anyway. If you tell it yes, then you
won't be able to UNFORMAT that disk later, no matter what. If you tell
it no, the |nFORMAT|n command will abort and you can delete a couple of the
files to make room for the |nMIRROR|n.FIL file and try the |nFORMAT|n again, but
isn't that pretty silly? If you take time to look on the disk and see
what files are there and delete a couple of them, you may as well look at
all of them and make sure you're not going to need any of them, and do a
regular |nFORMAT|n /U instead of the safe |sUNFORMAT|stable format.
<page down> for The |nGRAPHICS|n Command
The |TGRAPHICS|T Command
This command loads a TSR into memory, that will allow you to use the
<PrtScrn> or <Shift-PrtScrn> key to print your screen even when you're
not looking at a plain old text screen. You'll probably want to use the
/R switch which tells DOS to print black characters on white paper,
otherwise DOS will tell the printer to print the background in black and
leave white spaces in the shape of the letters. Isn't that silly? That
will take about a year to print, and about a ribbon and a half!
If you have DOS version 4 or later, you'll find a file named |nGRAPHICS|n.PRO
in your DOS directory. That's the instruction profile that |nGRAPHICS|n will
use to talk to the printer. If your printer is not closely enough com-
patible with an IBM printer, then hopefully your printer dealer supplied
you with your own .PRO file to use. Just rename it to |nGRAPHICS|n.PRO and
the |nGRAPHICS|n command will use it automatically. It must be in the same
directory with the |nGRAPHICS|n.COM file though.
<page down> for The |nHELP|n Command
The |THELP|T Command
This command is new to DOS version 5. If you type just |nHELP|n, you'll get
a list of all the DOS commands and a very short description of what each
is for. If you type this command followed by the name of another com-
mand, such as |nHELP|n ATTRIB, then the |nHELP|n command will load a copy of the
ATTRIB command and feed it the /? switch. So you'll get the exact same
result as if you'd typed ATTRIB /?. Because most of the commands in DOS
5.0 have a little screen of syntax information inside them.
For an example, here's what you'll see if you type MD /? or |nHELP|n MD:
Creates a directory.
MKDIR [drive:]|spath|s
MD [drive:]|spath|s
Not all that helpful, huh? Only if you've temporarily forgotten how to
use the command, not if you didn't already know how to use it.
<page down> for The |nJOIN|n Command
The |TJOIN|T Command
This is not exactly the safest of commands. If you ever have any desire
to try it, don't, unless you have a |ncurrent|n BACKUP of all the disks that
will be involved. This command didn't exist until DOS version 3.1.
This command is used to join one disk drive to an empty directory of some
other drive, so that it will seem like the files on the drive are instead
files in the empty directory on the other drive.
The syntax is like this:
|nJOIN|n D: D:\DIR
Suppose you want the files on drive A: to appear that they are files in
the \OTHER directory on drive C:. You would first make sure you have an
empty directory (with no files or other subdirectories in it) named OTHER
branching from the root directory on drive C: (if there is no such direc-
tory, |nJOIN|n will create it), then issue the |nJOIN|n A: C:\OTHER command. Now
when you do a DIR of C:\OTHER, the access light on drive A: will light up
for a minute, and a directory listing of the drive A: files will appear.
<page down> for more JOIN
Now if you issued the command DIR A:, you'd get an error message, "Inval-
id drive specification" because drive A: doesn't exist anymore.
To show what drives might be under the effect of a |nJOIN|n command, just
enter |nJOIN|n all by itself, with no parameters, and it will say something
like A: => C:\OTHER and if you want to unjoin them, just do |nJOIN|n A: /D.
That puts everything on drive A: and C:\OTHER back to normal.
APPEND, ASSIGN, BACKUP, CHDIR, CHKDSK, DEL, DISKCOMP, DISKCOPY, ERASE,
FASTOPEN, FDISK, FORMAT, LABEL, MIRROR, MKDIR, PATH, PRINT, RECOVER,
RESTORE, RMDIR, SUBST, and SY|1S are all commands that shouldn't be used
with a |nJOIN|n in effect.
And note that if you write any files to a JOINed directory, they will not
actually be written to that directory at all. They'll be written to the
disk that is joined to the directory. That directory stays completely
empty the whole time the |nJOIN|n is in effect. |nJOIN|n is not a TSR. It does
not use up any memory. That's about the only good thing to say about it.
<page down> for The |nLABEL|n Command
The |TLABEL|T Command
This command is used to put an |ninternal|n label onto a disk. You know,
when you do a DIR command and it comes up and says, "Volume in drive C
is Whatever"? "Whatever" is the |tvolume|t label.
You can use the /V switch with the FORMAT command to put the label on,
or you can use the |nLABEL|n command. The syntax is incredibly simple:
|nLABEL|n C:
|nLABEL|n A:
Whatever drive's disk you want to label, you just put that letter and
a colon after the |nLABEL|n command.
Now DOS will come back and say what the |ncurrent|n |nvolume|n label of the disk
is, and ask you what you want to change it to. You type what you want,
anything up to eleven characters and it can include spaces, and hit the
<Enter> key. If you want to leave the same label, or if you want to de-
lete the label, then you just hit <Enter> without typing anything. It
will ask you if you want to delete the label, so just answer the question
<page down> for more LABEL
with Y or N depending on what you want to do.
In recent DOS versions, you can also include the new label on the command
line, like this:
|nLABEL|n C:NEW NAME
and then it won't ask you anything. If that won't work for your version
of DOS, and you need to be able to do this without the command asking you
for further input, for example for use in a batch file, you can probably
use ECHO NEW NAME || |nLABEL|n C: instead. (See redirection.)
Volume labels are stored as directory entries, and they show up in your
CHKDSK readouts as Hidden files as well, even though they don't take up
any disk space like files do. The CHKDSK command just doesn't understand
the Volume attributes, so it interprets them as Hidden ones instead.
<page down> for The |nMIRROR|n Command
The |TMIRROR|T Command
This command is new to DOS version 5.0, but many of us have been using it
for quite some time. Microsoft licensed it from Central Point Software,
the makers of PC Tools. It performs two great functions. First, every
time you reboot the computer it stores a copy of your FAT, |nboot|n record,
and root directory in a nice safe place, for in case your originals get
trashed, then you can use the UNFORMAT command to put them back together
again. The files that |nMIRROR|n makes are called MIRORSAV.FIL, which has
its Hidden, System, and Read-only attributes turned on, and |nMIRROR|n.FIL
and |nMIRROR|n.BAK, which have their Read-only attributes turned on. These
files are going to go into your root directory whether you like it or
not. There's no way you can put them somewhere else, because if you do,
the program will just create new ones in the root directory the next time
you reboot. But you don't have to leave them visible in your directory
listing. The program recreates them each time, so you can't just turn on
their Hidden attributes and leave it at that. The next time you boot up,
they will be recreated without any Hidden attributes. But you can put
the command ATTRIB +H |nMIRROR|n.* into your AUTOEXEC.BAT file right after
<page down> for more MIRROR
the |nMIRROR|n command, and you'll never see those files in a DIR listing
again unless you use the /A switch with the DIR command.
Also, if you use the /T switch, |nMIRROR|n will install a TSR called Delete
Tracking. This one watches everything you do, and whenever you (or any
program) try to delete a file, it keeps a record of it and stores that
record in a file named PCTRACKR.|nDEL|n in your root directory, so that if
you should end up wanting to undelete the file, all the information the
UNDELETE command will need will be right there in that file, so that you
have a 100% chance of getting all of the file back unless you (or some
program) have written something to the disk in the spot where the file
was, between the time you deleted the file and the time you used the UN-
DELETE command on it. This PCTRACKR.|nDEL|n file has its System attribute
turned on, so you won't be bothered with looking at it in your DIR list-
ings all the time. It's also pretty difficult to delete this file. Be-
cause it keeps a record of every file you delete, if you delete it, it
recreates itself immediately in order to store a record of the fact that
you just deleted it. The only way to get rid of it is to reboot the com-
puter without the /T switch in the |nMIRROR|n command in your AUTOEXEC.BAT
<page down> for more MIRROR
file, then use the command ATTRIB -S PCTRACKR.|nDEL|n, and then delete it.
One thing you do not want to do if you ever do the command FORMAT C:, or
RECOVER C:, or DEL *.*, or ERASE *.* in the root directory, is reboot the
computer to see if the problem clears up. Sometimes |sreboot|sing can cure a
multitude of ills in a computer, but not in this case. And because MIR-
ROR stores the two most recent mirror images of your FAT and root direc-
tory, if you reboot once after you trash your drive, then your first copy
of the mirror image is bad, and if you reboot again, now both your copies
are bad and it's like as if you never used |nMIRROR|n in the first place. In
that case, the UNFORMAT command will have a terrible time trying to help
you. So don't do that. If |sreboot|sing once doesn't fix it, then |sreboot|sing
again won't either, and just destroys most of your chances for recovery.
The syntax for this command is like this:
|nMIRROR|n D: D: D: /1 /TD-## /TD-## /TD-##
where the D:s are the drive letters for which you want to save the FAT
and root directory information, /1 means you only want to save the most
recent copy instead of the two most recent copies, the Ds with the /T
<page down> for more MIRROR
switches tell what drives you want delete tracking installed for (that's
right, it's one of the rare times you want to refer to a drive letter
without including a colon), and the ##s stand for how many entries you
want to save for each drive. For example, here's the command I have in
my AUTOEXEC.BAT file:
|nMIRROR|n C: /TC-50
which means to save the FAT and directory information for the C: drive,
and install delete tracking to monitor deletions on the C: drive and save
information on only the 50 most recent files that I've deleted.
|nMIRROR|n C: D: /TC-100 /TD-50 /TE-25
would save the FAT and directory information for drives C: and D:, and
load delete tracking to save information on the most recent 100 deletions
on drive C:, the most recent 50 deletions on drive D:, and the 25 most
recent deletions on drive E:.
The value you use for the -## parameter can be from 1 to 999, and the
default depends on the size of the disk in question. If you have a hard
drive larger than 32M, the default will be a 55K file containing records
of the 303 most recent files you deleted.
<page down> for more MIRROR
You can unload the deletion tracking TSR by using the /U switch, as in
|nMIRROR|n /U, but it only works if you haven't loaded any other |sTSR|ss since
the time you loaded |nMIRROR|n, or if you unload the later |sTSR|ss first.
Of course, for the |nMIRROR|n command to work its magic, it has to be run
every day, and that means putting the command in your AUTOEXEC.BAT file.
The Hidden file that |nMIRROR|n saves some of its data in, MIRORSAV.FIL, gets
stored in the very last cluster on your hard drive, and if that spot on
your disk is bad, |nMIRROR|n will take a long time to run each time. So if
you find that it's taking a long time, you will want to run a surface
scan utility which will mark out |sbad sector|ss in the FAT, so that DOS
won't put any files in that spot. Then the MIRORSAV.FIL will go in the
next-to-last cluster on the disk instead, and won't take so long to run,
and will be a lot more reliable that way anyhow.
Another thing |nMIRROR|n can do is save a copy of your partition table to a
floppy disk. Put a disk into drive A: and type |nMIRROR|n /PARTN. This will
allow you to recover from an "|sInvalid drive specification|s" message if you
<page down> for more MIRROR
ever get such a thing on your hard drive. You only need to do that once,
ever, unless you repartition your drive, but make sure you don't lose the
floppy disk! The file |nMIRROR|n /PARTN will put on the floppy will be named
PARTNSAV.FIL, and UNFORMAT is the command you use to restore it.
For beginning of File 5, see Executable
|tAUTOEXEC.BAT|t|fSIMPLY1|f
|TCLS|T|fSIMPLY1|f
|TFASTOPEN|T|fSIMPLY1|f
|TFAT|T|fSIMPLY1|f
|tInvalid drive specification|t|fSIMPLY1|f
|tUNDELETE|t|fSIMPLY1|f
|tUNFORMAT|t|fSIMPLY1|f
|tBatch|t|fSIMPLY2|f
|TECHO|T|fSIMPLY2|f
|tRedirection|t|fSIMPLY2|f
|TREM|T|fSIMPLY2|f
|TTEMP|T|fSIMPLY2|f
|T286|T|fSIMPLY3|f
|T8088|T|fSIMPLY3|f
|TBIOS|T|fSIMPLY3|f
|tBytes|t|fSIMPLY3|f
|tCache|t|fSIMPLY3|f
|tConventional|t|fSIMPLY3|f
|tDEVICEHIGH|t|fSIMPLY3|f
|TDO|1S|T|fSIMPLY3|f
|tExpanded|t|fSIMPLY3|f
|teXtended|t|fSIMPLY3|f
|tHig|1h|t|fSIMPLY3|f
|tHIMEM.SYS|t|fSIMPLY3|f
|tkernel|t|fSIMPLY3|f
|tLOADHIGH|t|fSIMPLY3|f
|tMemory|t|fSIMPLY3|f
|TPRINT|T|fSIMPLY3|f
|tRAMdisk|t|fSIMPLY3|f
|tRAMDRIVE.SYS|t|fSIMPLY3|f
|TRAM|T|fSIMPLY3|f
|TRECOVER|T|fSIMPLY3|f
|TRESTORE|T|fSIMPLY3|f
|TSHARE|T|fSIMPLY3|f
|tSMARTDRV.SYS|t|fSIMPLY3|f
|TSUBST|T|fSIMPLY3|f
|tTSR|t|fSIMPLY3|f
|tUpper|t|fSIMPLY3|f
|TA|1:|T|fSIMPLY5|f
|TAUX|T|fSIMPLY5|f
|tBad command or filename|t|fSIMPLY5|f
|TCHDIR|T|fSIMPLY5|f
|tCOMMAND.COM|t|fSIMPLY5|f
|TCON|T|fSIMPLY5|f
|TCOPY|T|fSIMPLY5|f
|TCOUNTRY|T|fSIMPLY5|f
|tcurrent|t|fSIMPLY5|f
|tdefault|t|fSIMPLY5|f
|TDEL|T|fSIMPLY5|f
|tDevice|1s|t|fSIMPLY5|f
|TDIRCMD|T|fSIMPLY5|f
|tDirectory|t|fSIMPLY5|f
|TDIR|T|fSIMPLY5|f
|TERASE|T|fSIMPLY5|f
|tExecutable|t|fSIMPLY5|f
|TEXIT|T|fSIMPLY5|f
|texternal|t|fSIMPLY5|f
|tinternal|t|fSIMPLY5|f
|TKEYB|T|fSIMPLY5|f
|TMD|T|fSIMPLY5|f
|TMKDIR|T|fSIMPLY5|f
|TNLSFUNC|T|fSIMPLY5|f
|TPRN|T|fSIMPLY5|f
|TRENAME|T|fSIMPLY5|f
|TRMDIR|T|fSIMPLY5|f
|troot|t|fSIMPLY5|f
|tShelling Out|t|fSIMPLY5|f
|TTYPE|T|fSIMPLY5|f
|t*.*|t|fSIMPLY6|f
|tAbort, Retry, Fail, Ignore|t|fSIMPLY6|f
|tASCII|t|fSIMPLY6|f
|TBBS|T|fSIMPLY6|f
|tBoot|t|fSIMPLY6|f
|tBoo|1t Disk|t|fSIMPLY6|f
|tcluster|t|fSIMPLY6|f
|tdecimal|t|fSIMPLY6|f
|tDisks|t|fSIMPLY6|f
|tKeyboard|t|fSIMPLY6|f
|tLow-Level|t|fSIMPLY6|f
|tNon system disk|t|fSIMPLY6|f
|tParameters|t|fSIMPLY6|f
|tReboot|t|fSIMPLY6|f
|tsector|t|fSIMPLY6|f
|tShareware|t|fSIMPLY6|f
|TSY|1S|T|fSIMPLY6|f
|tWildcards|t|fSIMPLY6|f
|TAPPEND|T|fSIMPLY7|f
|TASSIGN|T|fSIMPLY7|f
|tAttributes|t|fSIMPLY7|f
|TATTRIB|T|fSIMPLY7|f
|TBACKUP|T|fSIMPLY7|f
|TCHKDSK|T|fSIMPLY7|f
|TDISKCOMP|T|fSIMPLY7|f
|TDISKCOPY|T|fSIMPLY7|f
|TDOSKEY|T|fSIMPLY7|f
|TDOSSHELL|T|fSIMPLY7|f
|TEDIT|T|fSIMPLY7|f
|TEDLIN|T|fSIMPLY7|f
|tHidden|t|fSIMPLY7|f
|toverlay|t|fSIMPLY7|f